import { createApp } from 'vue'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import locale from 'element-plus/es/locale/lang/zh-cn'

import '@/assets/styles/index.scss' // global css

import App from './App'
import store from './store'
import router from './router'

import SvgIcon from '@/components/SvgIcon'
import elementIcons from '@/components/SvgIcon/svgicon'

import './permission' // permission control

const app = createApp(App)

app.use(router)
app.use(store)
app.use(elementIcons)
app.component('svg-icon', SvgIcon)

app.use(ElementPlus, {
  locale: locale
})

app.mount('#app')
